package com.qijian.maindata.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;
import com.qijian.tool.domain.Storage;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.List;

/**
 * 生产BOM用料明细对象 main_bom_material_detail
 *
 * @author qijian
 * @date 2022-05-16
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("main_bom_material_detail")
public class BomMaterialDetail extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @TableId
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "ID")

    private Long id;

    @Excel(name = "表头ID")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "表头ID")

    private Long mainId;

    @Excel(name = "物料ID")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "物料ID")

    private Long itemId;

    @Excel(name = "物料编码")
    @ApiModelProperty(value = "物料编码")
    private String itemCode;

    @Excel(name = "物料分类")
    @ApiModelProperty(value = "物料分类")
    private String itemClassify;

    @Excel(name = "物料名称")
    @ApiModelProperty(value = "物料名称")
    private String itemName;

    @Excel(name = "物料属性")
    @ApiModelProperty(value = "物料属性")
    private String itemAttr;

    @Excel(name = "物料单位")
    @ApiModelProperty(value = "物料单位")
    private String itemUnit;

    @Excel(name = "物料辅助单位")
    @ApiModelProperty(value = "物料辅助单位")
    private String itemUnitSup;

    @Excel(name = "主数量")
    @ApiModelProperty(value = "主数量")
    private BigDecimal quantity;

    @Excel(name = "辅数量")
    @ApiModelProperty(value = "辅数量")
    private BigDecimal quantitySup;

    @Excel(name = "库存主数量")
    @ApiModelProperty(value = "库存主数量")
    private BigDecimal inventoryQuantity;

    @Excel(name = "库存辅数量")
    @ApiModelProperty(value = "库存辅数量")
    private BigDecimal inventoryQuantitySup;

    @Excel(name = "是否采购")
    @ApiModelProperty(value = "是否采购")
    private Boolean isPurm;

    @Excel(name = "是否允许替代")
    @ApiModelProperty(value = "是否允许替代")
    private Boolean isAllowSubstitution;

    @ApiModelProperty(value = "明细附件")
    @TableField(exist = false)
    private List<Storage> detailFiles;


    @Excel(name = "申请数量")
    @ApiModelProperty(value = "申请数量")
    private BigDecimal reqQuantity;

    @Excel(name = "批准数量")
    @ApiModelProperty(value = "批准数量")
    private BigDecimal confirmQuantity;

    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String materialRemark;

    @Excel(name = "库存备注")
    @ApiModelProperty(value = "库存备注")
    private String inventoryRemark;

    @TableField(exist = false)
    private String itemAttrNeed;

    private String cargoType;

}
